home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-17 | 9.1 KB | 220 lines | [TEXT/MPS ] |
- **************************************************************************
- What is VUAssist?
- **************************************************************************
- The code contained in this folder is the source code for a MacApp 3.0
- compatible version of VUAssist. VUAssist is a Virtual User assistance module
- for MacApp applications. By building VUAssist into your MacApp application,
- you will be able to manipulate the user interface of your application very
- easily with Virtual User.
-
-
- Technical Background
- --------- ----------
- In order to find the location of items in windows for V.U., Agent VU peruses
- the content list of windows and the item list of dialogs. For applications
- which are not built with MacApp, these data structures can be accessed via
- global variables by Agent VU. For MacApp applications, however, items in
- windows are subclasses of the class TView, which are not available to the
- Agent via global data structures. As a result, Agent VU can’t provide any
- information about these items to V.U. in the normal way.
-
- To work around this problem, Agent VU provides a hook which allows an
- application to assist Agent VU by providing information about itself.
- In this folder, we’ve provided VUAssist, an assistance module for MacApp
- applications which can be hooked onto Agent VU to provide information about
- a MacApp application. A developer can build a MacApp application with VUAssist
- and then test the application with V.U.. V.U. will "recognize" many of the
- application's views which translate into standard user interface items: buttons,
- scroll bars, checkboxes, static text, editable text fields, popup menus, etc.
-
-
- The module exists as a unit called UVUAssist. The unit consists of four files:
- VUAssist.p, VUAssist.inc1.p, VUAssist.inc2.p, and VUAssist.a.
-
-
- -----------------------------------------------------------------------------
- What's New in this Version - 1.0a1
- -----------------------------------------------------------------------------
- ******** Changes relative to the 1.0d11 version ********
-
- 1) VUAssist has been made compatible with MacApp 3.0.
-
- 2) IVUAssist no longer installs the VUAssist handler or sets its idle frequency.
- This is now the responsibility of the client of VUAssist (see "How To Use VUAssist"
- below).
-
- !!!!! NOTICE !!!!!
- 3) The instructions for building VUAssist into your application have changed
- slightly since the 1.0d11 version or earlier versions. The instructions given in the
- Virtual User General Reference are also not valid for this version. The new instructions
- are given below in the section "How To Use VUAssist".
-
-
- ******** Changes relative to the 1.0d7 version ********
-
- 1) VUAssist has now been defined as a descendant of TEventHandler. This allows VUAssist
- to be installed as a cohandler. The frequency with which VUAssist's DoIdle routine is
- called can now be controlled. This gives the user of VUAssist a convenient way to control
- the responsiveness of the application to Virtual User.
-
- 2) VUAssist's handling of TGridView objects has changed somewhat. The cells of TGridView
- objects now appear as "contentItems" to V.U. as opposed to "userItems". This is more
- consistent with V.U.'s interface item hierarchy. Useritems are really intended to describe
- Dialog Manager userItems while contentItems are effectively the "base class" of all interface
- items in V.U.. Since there is no class of interface items in V.U. which is intended to describe
- the cells of gridviews, they should be considered to belong to the "base class", contentItem.
-
- 3) The feature of VUAssist which maps the cells of gridviews to "contentitems" can be disabled
- through the boolean gridItemSupport argument to the IVUAssist method.
-
- 4) The implementation of some of the methods of VUAssist have been modified to improve
- performance.
-
-
- -----------------------------------------------------------------------------
- How to Use VUAssist
- -----------------------------------------------------------------------------
-
- To build VUAssist into your MacApp application, follow the instructions
- below.
-
- For applications written in Object Pascal:
-
- 1) Modify your MAMake file to include the following:
-
- • add the following to the list of OtherInterfaces
-
- "{SrcApp}UVUAssist.p"
-
- • add the following to the list of OtherLinkFiles
-
- "{ObjApp}UVUAssist.a.o" ∂
- "{ObjApp}UVUAssist.p.o"
-
- • add the additional dependencies:
-
- "{ObjApp}UVUAssist.p.o" ƒ ∂
- "{SrcApp}UVUAssist.p" ∂
- "{SrcApp}UVUAssist.inc1.p" ∂
- "{SrcApp}UVUAssist.inc2.p" ∂
- {MacAppIntf} ∂
- {BuildingBlocksIntf}
-
- "{ObjApp}UVUAssist.a.o" ƒ ∂
- "{SrcApp}UVUAssist.a"
-
- 2) Modify or subclass your descendant of TApplication to do the following:
-
- • In MyApplication.IApplication, you must execute this:
- NEW(gVUAssist);
- gVUAssist.IVUAssist(gridItemSupport); { gridItemSupport must be a boolean expression.
- see "Altering the behavior of VUAssist
- for an explanation of gridItemSupport }
- gVUAssist.SetIdleFreq(kVUAssistIdleFreq);
- SELF.InstallCohandler(gVUAssist,true);
-
- • In MyApplication.AboutToLoseControl you must execute this:
- gVUAssist.SuspendMole;
-
- • In MyApplication.RegainControl you must execute this:
- gVUAssist.ResumeMole;
-
- • In MyApplication.Close you must execute this BEFORE calling INHERITED Close:
- SELF.InstallCohandler(gVUAssist,false);
-
- 3) Include the unit UVUAssist in your USES clause where appropriate. Other units may
- need to be included along with UVUAssist if they are not already.
-
-
- For applications written in C++:
-
- 1) Modify your MAMake file to include the following:
-
- • add the following to the list of OtherInterfaces
-
- "{SrcApp}UVUAssist.h"
-
- • add the following to the list of OtherLinkFiles
-
- "{ObjApp}UVUAssist.a.o" ∂
- "{ObjApp}UVUAssist.p.o"
-
- • add the additional dependencies:
-
- "{ObjApp}UVUAssist.p.o" ƒ ∂
- "{SrcApp}UVUAssist.p" ∂
- "{SrcApp}UVUAssist.inc1.p" ∂
- "{SrcApp}UVUAssist.inc2.p" ∂
- {MacAppIntf} ∂
- {BuildingBlocksIntf}
-
- "{ObjApp}UVUAssist.a.o" ƒ ∂
- "{SrcApp}UVUAssist.a"
-
- 2) Modify or subclass your descendant of TApplication to do the following:
-
- • In MyApplication.IApplication, you must execute this:
- gVUAssist = new TVUAssist;
- gVUAssist->IVUAssist(gridItemSupport); /* gridItemSupport must be a boolean expression.
- see "Altering the behavior of VUAssist
- for an explanation of gridItemSupport */
- gVUAssist->SetIdleFreq(kVUAssistIdleFreq);
- this->InstallCohandler(gVUAssist, TRUE);
-
- • In MyApplication.AboutToLoseControl you must execute this:
- gVUAssist->SuspendMole();
-
- • In MyApplication.RegainControl you must execute this:
- gVUAssist->ResumeMole();
-
- • In MyApplication.Close you must execute this BEFORE calling INHERITED Close:
- this->InstallCohandler(gVUAssist,false);
-
- 3) Include the header file UVUAssist.h where appropriate.
-
- #ifndef __UVUASSIST__
- #include "UVUAssist.h"
- #endif
-
- 4) If you are using C++, make sure to use the VUAssist.a file which is included in the
- folder "C++ Interface to VUAssist" in place of the file with the same name which is
- found in the folder "VUAssist Source Code".
-
-
- -----------------------------------------------------------------------------
- Modifying the Behavior of VUAssist
- -----------------------------------------------------------------------------
-
- 1) VUAssist Idle Frequency
-
- VUAssist has now been defined to be a descendant TEventHandler. An application's
- responsiveness to V.U. queries can be controlled by setting the idle frequency of
- VUAssist. Although nothing is done with this idle time, it forces the application to
- awaken and call SystemTask with the application's context switched in. This is necessary
- for Agent VU, a driver, to get processing time. Agent VU, in turn, calls VUAssist.
- So, in a roundabout way, the application's responsiveness to V.U. can be controlled by
- setting the idle frequency of VUAssist.
-
- The default idle frequency is kVUAssistIdleFreq, which is set to 1. You may want to alter
- this by executing the following statement:
-
- gVUAssist.SetIdleFreq(newIdleFreq);
-
- Note, however, that larger values of VUAssist's idle frequency will slow down the application's
- response to V.U. unless there is another cohandler with a very high idle frequency.
-
-
- 2) The gridItemSupport Argument
-
- Note that the TVUAssist method IVUAssist now takes an argument, gridItemSupport. This
- argument, if true, enables an optional feature of VUAssist where the cells of gridviews are
- recognized as individual user interface items by V.U.. Virtual User does not yet have a
- gridview or list descriptor. So, for the short term, the "gridItemSupport" feature treats
- each cell of a gridview as a "contentitem" in the V.U. scripting language.
-
- In applications with very large gridviews, it may not be desirable to treat each cell in a
- gridview as a separate item in V.U.. This may severely hamper performance. By setting the
- value of the gridItemSupport argument to false, you will disable V.U.'s griditem support
- feature and the cells of gridviews will not be seen as "contentItems" by V.U.. The cells will
- be "invisible" to Virtual User.
-